package it.uniroma2.art.owlart.model.syntax.manchester;

import it.uniroma2.art.owlart.exceptions.ModelUpdateException;
import it.uniroma2.art.owlart.models.OWLModel;
import it.uniroma2.art.owlart.model.ARTResource;


public class Atomic {
	private Uri uri;
	private IndividualList classlist;
	private ObjectUnionOf or;
	public OWLModel model;
	public ARTResource resource;

	public Atomic(Uri u,OWLModel mod) {
		uri=u;
		//System.out.println("Creata classe: "+u.getName());
		classlist=null;
		or=null;
		model=mod;
		resource=uri.uriRes;
	}

	public Atomic(IndividualList l,OWLModel mod) throws ModelUpdateException {
		uri=null;
		classlist=l;
		or=null;
		model=mod;
		resource=l.getResource();
	}

	public Atomic(ObjectUnionOf o,OWLModel mod) throws ModelUpdateException {
		uri=null;
		//System.out.print("Creato atomic di or ");
		classlist=null;
		or=o;
		model=mod;
		o.createOntology();
		resource=o.resource;
	}

	public boolean isUri() {
		if(uri!=null) return true;
		else return false;
	}

	public Uri getUri() {
		return uri;
	}

	public boolean isIndividualList() {
		if(classlist!=null) return true;
		else return false;
	}

	public IndividualList getIndividualList() {
		return classlist;
	}

	public boolean isObjectUnionOf() {
		if(or!=null) return true;
		else return false;
	}

	public ObjectUnionOf getObjectUnionOf() {
		return or;
	}
}
